package com.aaa.phone.controller.noticecontroller;

import com.aaa.phone.service.noticeservice.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;
/**
* @description: 手机端广告Controller层
* @author: 王林林
* @create: 2018/12/15 9:05
**/
@RestController
@CrossOrigin
@RequestMapping("/notice")
public class NoticeController {

    @Autowired
    private NoticeService service;
    /*根据noticeId是否有值获取所有的广告信息或单个广告信息**/
    @RequestMapping("/getAllNotice")
    public List<Map> getAllNotice(Integer noticeId){
       //System.out.println("noticeId");
        return service.getAllNotice(noticeId);
    }
}
